<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/10/10
  Time: 9:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>information</title>
    <link type="text/css" rel="stylesheet" media="all" href="<%=request.getContextPath()%>/styles/global.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="<%=request.getContextPath()%>/styles/global_color.css"/>
    <%--<script language="javascript" type="text/javascript">--%>
    <%--//保存成功的提示信息--%>
    <%--function showResult() {--%>
    <%--showResultDiv(true);--%>
    <%--window.setTimeout("showResultDiv(false);", 3000);--%>
    <%--}--%>

    <%--function showResultDiv(flag) {--%>
    <%--var divResult = document.getElementById("save_result_info");--%>
    <%--if (flag)--%>
    <%--divResult.style.display = "block";--%>
    <%--else--%>
    <%--divResult.style.display = "none";--%>
    <%--}--%>

    <%--</script>--%>
</head>
<body>
<!--Logo区域开始-->
<div id="header">
    <img src="../images/logo.png" alt="logo" class="left"/>
    <a href="<%=request.getContextPath()%>/admins/exit">[退出]</a>
</div>
<!--Logo区域结束-->
<!--导航区域开始-->
<div id="navi">
    <c:import url="../navigation.jsp"/>
    <script>
        var li = document.getElementById("menu").children;
        var title = document.getElementsByTagName('title')[0].textContent;
        for (let i = 0; i < li.length; i++) {
            if (li[i].children[0].className.startsWith(title)){
                li[i].children[0].className = title + '_on';
            }
        }
    </script>
</div>
<!--导航区域结束-->
<!--主要区域开始-->
<div id="main">
    <!--保存操作后的提示信息：成功或者失败-->
    <c:forEach items="${info}" var="info">
        <div id="save_result_info" class="save_success">保存成功！</div>
        <!--保存失败，数据并发错误！-->
        <form action="<%=request.getContextPath()%>/user/modify" method="post" class="main_form">
            <div class="text_info clearfix">
                <span>管理员账号：</span>
            </div>
            <div class="input_info">
                <input type="text" readonly="readonly" class="readonly" name="adminCode" value="${info.adminCode}"/>
            </div>
            <div class="text_info clearfix"><span>角色：</span></div>
            <div class="input_info">
                <input type="text" readonly="readonly" class="readonly width400" value="${info.roleName}"/>
            </div>
            <div class="text_info clearfix"><span>姓名：</span></div>
            <div class="input_info">
                <input type="text" name="name" value="${info.name}"/>
                <span class="required">${result.getFieldError("name").defaultMessage}</span>
            </div>
            <div class="text_info clearfix"><span>电话：</span></div>
            <div class="input_info">
                <input type="text" class="width200" name="telephone" value="${info.telephone}"/>
                <span class="required">${result.getFieldError("telephone").defaultMessage}</span>
                    <%--<div class="validate_msg_medium">${result.getFieldError("telephone").defaultMessage}</div>--%>
            </div>
            <div class="text_info clearfix"><span>Email：</span></div>
            <div class="input_info">
                <input type="text" class="width200" name="email" value="${info.email}"/>
                <span class="required">${result.getFieldError("email").defaultMessage}</span>
                    <%--<div class="validate_msg_medium">${result.getFieldError("email").defaultMessage}</div>--%>
            </div>
            <div class="text_info clearfix"><span>创建时间：</span></div>
            <div class="input_info"><input type="text" readonly="readonly" class="readonly" name="enrolldate"
                                           value="${info.enrolldate}"/>
            </div>
            <div class="button_info clearfix">
                <input type="submit" value="保存" class="btn_save"/>
                <input type="reset" value="取消" class="btn_save"/>
                <input type="button" value="返回" class="btn_save" onclick="location.href='/index';"/>
            </div>
        </form>
    </c:forEach>
</div>
<!--主要区域结束-->
<div id="footer">
    <p>[源自北美的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</p>
    <p>版权所有(C)云科技有限公司 </p>
</div>
</body>
</html>
